"use strict";

const list = [
  {
    roleId: 1,
    menuId: 1,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 1,
    menuId: 2,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 1,
    menuId: 3,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 1,
    menuId: 4,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 1,
    menuId: 5,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 1,
    menuId: 6,
    createdAt: new Date(),
    updatedAt: new Date(),
  },

  {
    roleId: 2,
    menuId: 1,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 2,
    menuId: 2,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 2,
    menuId: 3,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 2,
    menuId: 4,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 2,
    menuId: 5,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 2,
    menuId: 6,
    createdAt: new Date(),
    updatedAt: new Date(),
  },

  {
    roleId: 3,
    menuId: 1,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 3,
    menuId: 2,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 3,
    menuId: 3,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 3,
    menuId: 4,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 3,
    menuId: 5,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    roleId: 3,
    menuId: 6,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
];

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
     */
    await queryInterface.bulkInsert("RolesMenus", list, {});
  },

  async down(queryInterface, Sequelize) {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
    await queryInterface.bulkDelete("RolesMenus", null, {});
  },
};
